home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
cbuket
/
compress.frm
< prev
next >
Wrap
Text File
|
1994-10-07
|
3KB
|
104 lines
VERSION 2.00
Begin Form CompressBucket
BorderStyle = 0 'None
ClientHeight = 810
ClientLeft = 1245
ClientTop = 1605
ClientWidth = 810
ControlBox = 0 'False
Height = 1275
Icon = COMPRESS.FRX:0000
Left = 1155
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 810
ScaleWidth = 810
Top = 1230
Width = 990
Begin PictureBox Picture1
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 390
Left = 0
Picture = COMPRESS.FRX:0302
ScaleHeight = 390
ScaleWidth = 315
TabIndex = 0
Top = 0
Width = 315
End
Begin DragDrop DragDrop1
Left = 360
Top = 420
End
End
Sub DragDrop1_Drop (PointX As Long, PointY As Long)
Dim PosFlag%
Dim TempFile$
Dim DragItem$
Dim DropIndex%
msg$ = "We're handling files Asynchronously."
msg$ = msg$ & Chr$(10) & Chr$(13) & Chr$(10) & Chr$(13)
msg$ = msg$ & "Wait for all DOS icons to close before "
msg$ = msg$ & "clicking on the bucket to close it, as "
msg$ = msg$ & "there may still be files "
msg$ = msg$ & "in the active queue."
msg$ = msg$ & Chr$(10) & Chr$(13) & Chr$(10) & Chr$(13)
msg$ = msg$ & "Total system memory will determine "
msg$ = msg$ & "how many files can be processed. We suggest a "
msg$ = msg$ & "maximum of 20."
response% = MsgBox(msg$, 49, "Multi-File Processing")
If response% = 2 Then Exit Sub
nf% = DragDrop1.FileCount
For i% = 0 To nf% - 1
WorkFile = Trim$(DragDrop1.FileName(DropIndex%))
For n% = 1 To Len(WorkFile)
char$ = Mid$(WorkFile, n%, 1)
If char$ = "\" Then
PosFlag% = n%
End If
Next n%
DragItem$ = Right$(WorkFile, (Len(WorkFile) - PosFlag%))
TempFile$ = Left$(Trim$(DragItem$), Len(DragItem$) - 1)
CompFile = TempFile$ & "_"
X% = Shell("maksmall.pif " & WorkFile & " " & WorkingDir & "\compress\" & CompFile, 2)
' removing the rems from the following
' will cause compression to be executed
' synchronous, rather than asynchronous
' While GetModuleUsage(X%) > 0
' z% = DoEvents()
' Wend
DropIndex% = DropIndex% + 1
Next i%
End Sub
Sub Form_Click ()
End
End Sub
Sub Form_Load ()
left = screen.Width - 1000
top = screen.Height - 1000
Width = picture1.Width
Height = picture1.Height
SetWindowPos CompressBucket.hWnd, HWND_TOPMOST, 0, 0, 0, 0, &H40
End Sub
Sub Picture1_Click ()
End
End Sub